#pragma once
#include "DevicePlatform.h"

namespace mini
{
#ifdef WIN32
#define CVector D3DXVECTOR3
#endif
class CVector3D  final
{
public:
	CVector3D();
	explicit CVector3D(float* fArray);
	CVector3D(float _x, float _y, float _z);
	~CVector3D();
	CVector3D(const CVector3D& v);
	CVector3D(const CVector3D&& v) noexcept;
	void zero();
	void normal();
	CVector3D &operator = (const CVector3D& v);
	CVector3D &operator = (CVector3D&& v) noexcept;
	bool operator == (const CVector3D& v);
	CVector3D operator - () const;
	CVector3D operator + (const CVector3D& v);
	CVector3D operator - (const CVector3D& v);
	CVector3D operator += (const CVector3D& v);
	CVector3D operator -= (const CVector3D& v);
	CVector3D operator / (float fvalue);
	CVector3D operator * (float fvalue);

	CVector3D operator *= (float fvalue);
	CVector3D operator /= (float fvalue);

public:
	union
	{
		struct
		{
			float x, y, z;
		};
		float m[3];
	};
};
}
